from redis import StrictRedis
import logging

class Config(object):


    SECRET_KEY='sdf213asggh5re3t2dsf13sg13'

    SQLALCHEMY_DATABASE_URI='mysql://root:mysql@127.0.0.1:3306/wanshang'

    SQLALCHEMY_TRACK_MODIFICATIONS = False

    REDIS_HOST='127.0.0.1'
    REDIS_PORT=6379

    SESSION_TYPE='redis'
    SESSION_USE_SIGNER = True
    SESSION_PERMANENT = False
    PERMANENT_SESSION_LIFETIME = 86400

    LOG_LEVEL = logging.DEBUG
    SESSION_REDIS = StrictRedis(host=REDIS_HOST, port=REDIS_PORT)

class kaifa(Config):
    DEBUG = True


class shenchan(Config):
    DEBUG = False
    LOG_LEVEL = logging.WARNING

class ceshi(Config):
    DEBUG = True
    TESTING=True

config= {
    'kf':kaifa,'sc':shenchan,'cs':ceshi
}